﻿#pragma once

#include <QtGlobal>
#include <QString>

namespace Domy {

/**
 * @brief The ActionKey enum
 * @note  action键
 */
enum ActionKey
{
    ActKey_Unknown = 0,
    ActKey_NewFile,
    ActKey_OpenFile,
    ActKey_CloseFile,
    ActKey_CloseAllFiles,
    ActKey_RecentFiles,
    ActKey_RecentFilePath,
    ActKey_RecentFilesClear,
    ActKey_SaveOne,
    ActKey_SaveAs,
    ActKey_SaveAll,
    ActKey_Exit,
    ActKey_Undo,
    ActKey_Redo,
    ActKey_Copy,
    ActKey_Cut,
    ActKey_Paste,
    ActKey_SelectAll,
    ActKey_Find,
    ActKey_FindPrev,
    ActKey_FindNext,
    ActKey_Shortcut,
    ActKey_ShortcutComment,
    ActKey_ShortcutApostrophe,
    ActKey_ShortcutQuotation,
    ActKey_ShortcutAngleBracket,
    ActKey_ShortcutParen,
    ActKey_ShortcutBracket,
    ActKey_ShortcutBrace,
    ActKey_WindowsLayout,
    ActKey_WindowsLayoutLoad,
    ActKey_WindowsLayoutReset,
    ActKey_WindowsLayoutSave,
    ActKey_WindowsLayoutSaveAs,
    ActKey_Settings,
    ActKey_HelpDocument,
    ActKey_Regist,
    ActKey_AboutUs,
};

/**
 * @brief The FileSavedReturnCode enum
 * @note  文件保存返回码
 */
enum FileSavedReturnCode
{
    FileSavedCode_Failed     = -1,
    FileSavedCode_NoFilePath = 0,
    FileSavedCode_Suc        = 1,
    FileSavedCode_NoChanged  = 2,
};

/**
 * @brief The EditorIndex enum
 * @note  编辑器页面索引
 */
enum EditorIndex
{
    EditorIndex_Text = 0,
    EditorIndex_Node,
    EditorIndex_Graphics,
    EditorIndex_Preview,
    EditorCounts,
};

/**
 * @brief The ColorSchemeParamIndex enum
 * @note  配色方案参数索引
 */
enum ColorSchemeParamIndex
{
    SchemeParam_Color = 0,
    SchemeParam_Bold,
    SchemeParam_Italic,
    SchemeParam_Underline,
};

/**
 * @brief The ColorSchemeItem enum
 * @note  配色方案项
 */
enum ColorSchemeItem {
    SchemeItem_Tag = 0,
    SchemeItem_Attr,
    SchemeItem_AttrText,
    SchemeItem_Comment,
};

/**
 * @brief The TabPolicy enum
 * @note  制表符策略
 */
enum TabPolicy {
    TabPolicy_Spaces = 0,
    TabPolicy_Tabs,
};

/**
 * @brief The MessageType enum
 * @note  消息类型
 */
enum MessageType {
    MsgType_Info = 0,
    MsgType_Warning,
    MsgType_Error,
};

/**
 * @brief The IssuesType enum
 * @note  问题类型
 */
enum IssuesType {
    IssuesType_Error = 0,
    IssuesType_Warning,
};

/**
 * @brief The Issues struct
 * @note  问题
 */
struct Issues
{
    IssuesType type;
    QString    text;
    QString    file_name;
    int        line;
    int        column;
    QString    line_text;
    QString    time;
};

} // namespace Domy
